import { Component ,OnInit} from '@angular/core';
import { Router } from '@angular/router';

import * as Parse from "parse"
@Component({
  selector: 'app-subpage-tt-jcc',
  templateUrl: './subpage-tt-jcc.component.html',
  styleUrls: ['./subpage-tt-jcc.component.scss']
})
export class SubpageTtJccComponent {
name:string=''
password:string=''

userdata:any
constructor(private router:Router){
  this.userdata = Parse.User.current()
}
login(){
  Parse.User.logIn(this.name,this.password).then(data=>{
    this.userdata = data
    this.router.navigate(["/mobile-cooking/my"])
  })
}
logout(){
  Parse.User.logOut();
  this.userdata = undefined
}
};





